<?php

namespace app\api\controller\user;

use app\api\controller\Base;
use app\common\service\user\UserAttentionService;

class UserAttention extends Base
{
    public function attention()
    {
        $uid = $this->request->uid;
        $goods_id = $this->request->post('goods_id',0,'int');
        if (is_int($goods_id) && $goods_id <= 0) {
            return $this->result([],400,'参数错误');
        }

        $data = UserAttentionService::attention($uid,$goods_id);
        return $this->res($data);
    }
}